import 'package:equatable/equatable.dart';
import 'package:mobile_app.core/purchases/application/models/purchase_restoration_failures.dart';

sealed class PurchaseRestorationStatus {}

class InitialPurchaseRestorationStatus extends Equatable implements PurchaseRestorationStatus {
  const InitialPurchaseRestorationStatus();

  @override
  List<Object?> get props => [];
}

class PurchaseRestorationInProgress extends Equatable implements PurchaseRestorationStatus {
  const PurchaseRestorationInProgress();

  @override
  List<Object?> get props => [];
}

class PurchaseRestorationCompleted extends Equatable implements PurchaseRestorationStatus {
  const PurchaseRestorationCompleted({
    required this.premiumAccessActive,
  });

  final bool premiumAccessActive;

  @override
  List<Object?> get props {
    return [
      premiumAccessActive,
    ];
  }
}

class PurchaseRestorationFailed extends Equatable implements PurchaseRestorationStatus {
  const PurchaseRestorationFailed({
    required this.failure,
  });

  final PurchaseRestorationFailure failure;

  @override
  List<Object?> get props {
    return [
      failure,
    ];
  }
}
